<%@page import="org.joda.time.DateTime,org.jackysoft.entity.User,org.jackysoft.entity.Department"%>
<%@ page language="java" pageEncoding="utf-8"%>
<%@ page import="org.jackysoft.entity.Journal" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="css/apps/journal/get.css" type="text/css" rel="stylesheet" />
<script src="scripts/apps/journal/get.js" type="text/javascript"></script>
</head>
<body>
<%
			//-------- SOAOFFICE 服务器端编程开始 ------------------------ //
			SOAOfficeX.SOAOfficeCtrl SOACtrl = new SOAOfficeX.SOAOfficeCtrl(pageContext);

            Object base = session.getAttribute("base");            
			// 设置SOAOFFICE中间件服务页面
			SOACtrl.ServerURL = base.toString()+"soalet/soaserv.do";

			Object ouser = session.getAttribute("loginUser");
			
			User user = (User)ouser;
			
			Department dept = user.getDepartment();
			
			// 设置界面样式
			SOACtrl.MainStyle = 2;
			SOACtrl.Caption = "西安庆华公司 ["+dept.getName()+"] 工作日志,正在由 ["+user.getLocalName()+"] 编辑...";
			SOACtrl.BorderStyle = 0;
			SOACtrl.Titlebar = true;
			//SOACtrl.TitlebarColor = Color.decode("#FF0000");
			//SOACtrl.TitlebarTextColor = Color.decode("#FFFF00");
			SOACtrl.Menubar = true;
			SOACtrl.Toolbars = true;

			//设置保存文档的服务器页面
			
			String pid = "Excel.Sheet";		
			
			Object obean = request.getAttribute("bean");
			
						
			Journal bean = (Journal)obean;
			
			DateTime dt = bean.getCreateDate();
			
			String dstr = dt.getYear()+"-"+dt.getMonthOfYear()+"-"+dt.getDayOfMonth();
			
			SOACtrl.SaveDocURL = "journal!savecontent?bean.id="+bean.getId();
			String openurl = "journal!loadcontent?bean.id="+bean.getId();
			//String openurl="../../attachment/ext/product.xls";
			out.println(openurl);
			// 打开文档			
			SOACtrl.webOpen(openurl, 0, user.getLocalName(), pid);
			// -------- SOAOFFICE 服务器端编程结束 ------------------------ //
%>
<%@ include file="../common/soaobject.jsp" %>
</body>
</html>